package cn.com.surker.material.entity;

import cn.com.surker.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 材料历史盘点明细表
 * </p>
 *
 * @author admin
 * @since 2024-06-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class MainMaterialHistoryInventory extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 公司ID
     */
    private Long orgId;

    /**
     * 材料ID
     */
    private Long materialId;

    /**
     * 仓位ID
     */
    private Long storeId;
    /**
     * 工控仓位ID
     */
    private Long controlStoreId;
    /**
     * 生成时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date startDate;

    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date checkDate;

    /**
     * 期初值
     */
    private Double initial;

    /**
     * 购进值
     */
    private Double crease;

    /**
     * 消耗值
     */
    private Double reduse;

    /**
     * 调整值
     */
    private Double adjustment;

    /**
     * 盘点计算(0:系统计算1:原材盘点2:仓位换料)
     */
    private Integer type;
    public MainMaterialHistoryInventory(){}
    public MainMaterialHistoryInventory(Long orgId, Long materialId, Long storeId, Date startDate, Date checkDate,
                                        Double initial, Double crease, Double reduse, Double adjustment, Integer type, Long controlStoreId) {
        this.orgId = orgId;
        this.materialId = materialId;
        this.storeId = storeId;
        this.startDate = startDate;
        this.checkDate = checkDate;
        this.initial = initial;
        this.crease = crease;
        this.reduse = reduse;
        this.adjustment = adjustment;
        this.type = type;
        this.controlStoreId = controlStoreId;
    }
}
